/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * anjuta-avr-plugin
 * Copyright (C) Lucas van Dijk 2011 <info@return1.net>
 * 
 * anjuta-avr-plugin is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * anjuta-avr-plugin is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _AVR_CONFIGURE_WIDGET_H_
#define _AVR_CONFIGURE_WIDGET_H_

#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

#define AVR_TYPE_CONFIGURE_WIDGET             (avr_configure_widget_get_type ())
#define AVR_CONFIGURE_WIDGET(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), AVR_TYPE_CONFIGURE_WIDGET, AVRConfigureWidget))
#define AVR_CONFIGURE_WIDGET_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), AVR_TYPE_CONFIGURE_WIDGET, AVRConfigureWidgetClass))
#define AVR_IS_CONFIGURE_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AVR_TYPE_CONFIGURE_WIDGET))
#define AVR_IS_CONFIGURE_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), AVR_TYPE_CONFIGURE_WIDGET))
#define AVR_CONFIGURE_WIDGET_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), AVR_TYPE_CONFIGURE_WIDGET, AVRConfigureWidgetClass))

typedef struct _AVRConfigureWidgetClass AVRConfigureWidgetClass;
typedef struct _AVRConfigureWidget AVRConfigureWidget;

struct _AVRConfigureWidgetClass
{
	GtkFrameClass parent_class;

	void (* changed) (AVRConfigureWidget *widget);
};

struct _AVRConfigureWidget
{
	GtkFrame parent_instance;

	GtkComboBoxText *target_device_combo;
	GtkEntry *cpu_freq_entry;
};

GType avr_configure_widget_get_type (void) G_GNUC_CONST;

AVRConfigureWidget* avr_configure_widget_new(void);

void avr_configure_widget_add_target_device(AVRConfigureWidget *obj, const gchar *name);
void avr_configure_widget_set_target_device(AVRConfigureWidget *obj, gint position);
void avr_configure_widget_set_cpu_freq(AVRConfigureWidget *obj, const gchar *freq);

const gchar * avr_configure_widget_get_cpu_freq(AVRConfigureWidget *obj);
const gchar * avr_configure_widget_get_target_device(AVRConfigureWidget *obj);

G_END_DECLS

#endif /* _AVR_CONFIGURE_WIDGET_H_ */
